package Factory;

import Clain.SafetyEvent;
import Clain.SafetyHandler;
import Observer.EnvironmentData;
import Observer.EnvironmentObserver;
import State.MachineState;
import Strategy.OperationStrategy;

public interface AgriculturalMachine extends EnvironmentObserver {
    void start();
    void stop();
    void executeTask();
    MachineType getType();

    MachineState getState();
    void setState(MachineState state);
    String getStatusDescription();

    // 添加暂停和恢复方法
    void pause();
    void resume();

    // 添加定时任务控制方法
    void startAutoUpdate(int intervalSeconds);
    void stopAutoUpdate();

    void update(EnvironmentData data);

    void setStrategy(OperationStrategy strategy);

    // 路径规划方法
    void planPath(EnvironmentData data);

    boolean isWorking();

    void handleSafetyEvent(SafetyEvent event, SafetyHandler safetyHandler);
    // 其他方法...

    double getWorkingWidth();
    double getSpeed();

}
